package com.atbeijing.bigdata.spark.core.rdd.instance

import org.apache.spark.rdd.RDD
import org.apache.spark.{SparkConf, SparkContext}

object Spark01_Instance_Memory_Data {

    def main(args: Array[String]): Unit = {

        val conf = new SparkConf().setMaster("local").setAppName("Instance")
        val sc = new SparkContext(conf)

        // TODO  RDD - 创建 - 从内存中
        val seq = Seq(1,2,3,4,5,6,7)

        val rdd: RDD[Int] = sc.makeRDD(seq,3)
        rdd.saveAsTextFile("output")

        sc.stop()
    }
}
